<template>
  <div class="bannerdata">
    <Banners :data="bannersData"/>
  </div>
</template>

<script>
import Banners from "@/components/home/Banners"
export default {
  name: 'BannerData',
  data(){
    return{
      bannersData:[]
    }
  },
  components:{
    Banners
  },
  props:{
    url:{
      type:String,
      default:""
    }
  },
  mounted(){
    this.$axios.get(this.url)
    .then(res => {
      this.bannersData = res.data.banner
    })
    .catch(error => {
      console.log(error);
    })
  }
}
</script>

<style lang="css" scoped>

</style>